home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 July
/
EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso
/
earkit
/
news
/
thor
/
rexx
/
bbsread
/
chkdupesandcross.br
< prev
next >
Wrap
Text File
|
1998-05-24
|
3KB
|
119 lines
/* $VER: ChkDupesAndCross 2.1 (7.9.97)
*
* THOR script by Henrik Dissing, hendis@post4.tele.dk
*
* Checks for duplicates and cross-postings in one or all Systems.
* If run from within THOR, current System will be scanned.
* Duplicates (identical messages in same conference) are deleted,
* while cross-postings of same message in multiple conferences
* are marked as read.
* Apply the VERBOSE switch to see progress information.
* THOR does not need to run during execution, but if it does
* the Conference window will be updated afterwards.
*/
talk = 'N' /* set to Y if you want progress info when run from within THOR */
/***** No config parameters below this line *****/
version = substr(sourceline(1), 11)
if ~show('p','BBSREAD') then do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
address
end
ports = address() || ' ' || show('p')
do i = 1 to words(ports)+1 while left(thorport, 5) ~= "THOR." | ~datatype(right(thorport, 2), 'w')
thorport = word(ports, i)
end
if address() == thorport then do
'CURRENTSYSTEM STEM CURRENT'
if rc == 1 then do
'REQUESTNOTIFY TEXT "You must enter a system first!" BT "Ok"'
exit 0
end
if rc == 30 then do
say THOR.LASTERROR
exit 20
end
BBS = CURRENT.BBSNAME
if talk = "Y" then
verbose = "SHOWPROGRESS"
else
verbose = ""
address BBSREAD
'FINDDUPBRMSG BBSNAME "'BBS'" DELETEDUPINCONF UNMARKCROSSPOSTS' verbose
if(rc ~= 0) then do
say BBSREAD.LASTERROR
exit 10
end
address(thorport)
'REQUESTNOTIFY TEXT "ChkDupesAndCross.br finished" BT "Ok"'
'ISCONFERENCELIST'
if rc == 0 then do
'UPDATECONFWINDOW'
if rc ~= 0 then do
say BBSREAD.LASTERROR
exit 10
end
end
end
else do
template = 'BBSNAME/A,VERBOSE/S'
address(BBSREAD)
parse arg arguments
'READARGS TEMPLATE' template 'STEM ARGS CMDLINE' arguments
if rc ~= 0 | ARGS.BBSNAME = "?" then do
say version
say "Template:" template
exit 0
end
options failat 31
if upper(ARGS.BBSNAME) = "ALL" then do
'GETBBSLIST STEM BBSLIST'
if rc ~= 0 then do
say BBSREAD.LASTERROR
exit 10
end
end
else do
BBSLIST.1 = ARGS.BBSNAME
BBSLIST.COUNT = 1
end
if ARGS.VERBOSE ~= 0 then
verbose = "SHOWPROGRESS"
else
verbose = ""
do n=1 to BBSLIST.COUNT
'FINDDUPBRMSG BBSNAME "'BBSLIST.n'" DELETEDUPINCONF UNMARKCROSSPOSTS' verbose
if(rc ~= 0) then do
say BBSREAD.LASTERROR
exit 10
end
end
say "ChkDupesAndCross.br finished!"
end
exit 0